import java.util.Arrays;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 17655
 * Date: 2025-07-09
 * Time: 18:57
 */
public class test6 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            int n = in.nextInt();
            int k = in.nextInt();
            int[] a = new int[n];
            for(int i=0;i<n;i++){
                a[n] = in.nextInt();
            }
            int sum = 0;
            while(k>0){
                Arrays.sort(a);
                int i = n-1;
                if(a[i]%2==0){
                    a[i] /= 2;
                    k--;
                    i = n-1;
                }else{
                    i--;
                }
            }
            for(int aa:a){
                sum += aa;
            }
            System.out.println(sum);
        }
    }
}
